<!doctype html>
<html lang="enCH">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新联学院“十佳学生”投票系统</title>
    <link href="/static/css/index.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="/static/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
    <script type="text/javascript" src="/static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="/static/js/main.js"></script>
    <script src="/static/js/ini.js"></script>
</head>

<body>
<table cellSpacing=0 cellPadding=0 align=center width="960px">
    <tr>
        <td id="banner">"十佳学生"评选

            {% if user %} {# 已登录 {{ url_for(" user.user_info") }} #}

            <div class="user_login fr">
                <img {% if user.avatar_url %}

                    src="{{ user.avatar_url }}"

                     {% else %}
                     src="/static/images/1.jpg"

                     {% endif %}

                     class="lgin_pic">
                <a href="http://127.0.0.1:8000/home/index" id="nick_name">{{ user.nick }}</a>
                <a href="javascript:;" onclick="logout()">退出</a>
            </div>

            {% else %}

            <div class="user_btns fr">
                <a href="javascript:;" class="login_btn">登录</a> / <a href="javascript:;" class="register_btn">注册</a>
            </div>

            {% endif %}

        </td>
    </tr>
    <tr>
        <td id="menu"><a href="http://127.0.0.1:8000/home/index">首页</a>

            - <a href="http://127.0.0.1:8000/home/introduce">活动介绍</a>

            - <a href="http://127.0.0.1:8000/home/rule">投票规则</a>

            - <a href="http://127.0.0.1:8000/home/affiche">系统公告</a>

            - <a href="http://127.0.0.1:8000/home/list" target="_blank">评选排行</a>

            - <a href="http://127.0.0.1:8000/home/personal" target="_blank">个人中心</a>
        </td>
    </tr>
</table>
<table width="960px" align="center" bgcolor="#F0F7FF">
 <tr>
  <td colspan="4" style="line-height:20px">
    <table width="96%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#aec3de">
      <tr align="center" bgcolor="#F0F7FF" style="font-weight:bold">
        <td width="10%">票数排名</td>
        <td width="12%">参选姓名</td>
        <td width="13%"><a href="?lb=ps">用户ID</a></td>
        <td width="10%"><a href="?lb=rq">获票数量</a></td>
         <td width="15%"><a href="?lb=rq">备注</a></td>
      </tr>

        {% for use in users %}

      <tr align='center' bgcolor='#FFFFFF' onmouseover='this.style.background="#F2FDFF"' onmouseout='this.style.background="#FFFFFF"'>
		 <td><b>{{forloop.counter}}</b></td>
         <td>{{use.user_name}}</td>
         <td>{{use.id}}</td>
		 <td>{{use.vote_num}}</td>
          <td>{{use.txt}}</td>

       </tr>

        {% endfor %}


      </table>
  </td>
 </tr>
</table>

<!-- 登录表单 -->
<form class="login_form_con">
    <div class="login_form">
        <div class="login_title">
            <h3>登 录</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>
        <div class="form_group">
            <input id="mobile" type="text" name="mobile" autocomplete="off">
            <div class="input_tip">手机号</div>
            <div id="login-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
        <div class="form_group">
            <input id="password" type="password" name="password">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="login-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="登 录" class="input_sub">
        <div class="down_link">还没有账号？<a href="javascript:;" class="to_register">立即注册</a></div>
    </div>
    <div class="mask"></div>
</form>

<!-- 注册表单 -->
<form class="register_form_con">
    <div class="register_form">
        <div class="register_title">
            <h3>注 册</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>
        <div class="form_group">
            <input type="text" name="mobile" autocomplete="off" id="register_mobile" class="phone_input">
            <div class="input_tip">手机号</div>
            <div id="register-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
        <div class="form_group">
            <input type="text" name="code_pwd" id="imagecode" class="code_pwd">
            <div class="input_tip">图形验证码</div>
            <img src="../../static/news/images/pic_code.png" class="get_pic_code" onclick="generateImageCode()">
            <div id="register-image-code-err" class="error_tip">图形码不能为空</div>
        </div>
        <div class="form_group">
            <input type="text" name="smscode" id="smscode" class="code_pwd">
            <div class="input_tip">手机验证码</div>
            <a href="javascript:;" class="get_code" onclick="sendSMSCode()">点击获取验证码</a>
            <div id="register-sms-code-err" class="error_tip">验证码不能为空</div>
        </div>
        <div class="form_group">
            <input type="password" name="password" id="register_password" class="pass_input">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="register-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="注 册" class="input_sub">
        <div class="down_link">已有账号？<a href="javascript:;" class="to_login">立即登录</a></div>
    </div>
    <div class="mask"></div>
</form>


<table cellSpacing=0 cellPadding=0 align=center background="/static/images/botbj.jpg" width="960px">
    <tr>
        <td height=60 align="center" id="Bottom"><a href="https://www.xlxy.edu.cn/" target="_blank">新联学院</a> Copyright
            2018-2019 新联学院 毕业设计 &#8482;
        </td>
    </tr>
</table>
</body>
</html>